package com.example.sup.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName log
 */
@TableName(value ="log")
@Data
public class Log implements Serializable {
    /**
     * 日志表
     */
    @TableId(type = IdType.AUTO)
    private Integer logId;

    /**
     * 地址
     */
    private String address;

    /**
     * 设备id
     */
    private Integer prisonId;

    /**
     * 设备名称
     */
    private String prisonName;

    /**
     * 1监室操作 2配置设置 3任务设置 4其它
     */
    private Integer type;

    /**
     * 操作信息
     */
    private String message;

    /**
     * 预留字段1
     */
    private String reservedFields1;

    /**
     * 预留字段2
     */
    private String reservedFields2;

    /**
     * 
     */
    private Date createTime;

    /**
     * 
     */
    private String createBy;

    /**
     * 
     */
    private Date updateTime;

    /**
     * 
     */
    private String updateBy;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Log other = (Log) that;
        return (this.getLogId() == null ? other.getLogId() == null : this.getLogId().equals(other.getLogId()))
            && (this.getAddress() == null ? other.getAddress() == null : this.getAddress().equals(other.getAddress()))
            && (this.getPrisonId() == null ? other.getPrisonId() == null : this.getPrisonId().equals(other.getPrisonId()))
            && (this.getPrisonName() == null ? other.getPrisonName() == null : this.getPrisonName().equals(other.getPrisonName()))
            && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
            && (this.getMessage() == null ? other.getMessage() == null : this.getMessage().equals(other.getMessage()))
            && (this.getReservedFields1() == null ? other.getReservedFields1() == null : this.getReservedFields1().equals(other.getReservedFields1()))
            && (this.getReservedFields2() == null ? other.getReservedFields2() == null : this.getReservedFields2().equals(other.getReservedFields2()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getCreateBy() == null ? other.getCreateBy() == null : this.getCreateBy().equals(other.getCreateBy()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getUpdateBy() == null ? other.getUpdateBy() == null : this.getUpdateBy().equals(other.getUpdateBy()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getLogId() == null) ? 0 : getLogId().hashCode());
        result = prime * result + ((getAddress() == null) ? 0 : getAddress().hashCode());
        result = prime * result + ((getPrisonId() == null) ? 0 : getPrisonId().hashCode());
        result = prime * result + ((getPrisonName() == null) ? 0 : getPrisonName().hashCode());
        result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
        result = prime * result + ((getMessage() == null) ? 0 : getMessage().hashCode());
        result = prime * result + ((getReservedFields1() == null) ? 0 : getReservedFields1().hashCode());
        result = prime * result + ((getReservedFields2() == null) ? 0 : getReservedFields2().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getCreateBy() == null) ? 0 : getCreateBy().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getUpdateBy() == null) ? 0 : getUpdateBy().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", logId=").append(logId);
        sb.append(", address=").append(address);
        sb.append(", prisonId=").append(prisonId);
        sb.append(", prisonName=").append(prisonName);
        sb.append(", type=").append(type);
        sb.append(", message=").append(message);
        sb.append(", reservedFields1=").append(reservedFields1);
        sb.append(", reservedFields2=").append(reservedFields2);
        sb.append(", createTime=").append(createTime);
        sb.append(", createBy=").append(createBy);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", updateBy=").append(updateBy);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}